function validate()
{
	if(document.AddForm.vendorName.value==''){
		alert("Please Enter Vendor Name");
		return false;
	}
	var i=0;
	var departmentDropDown = document.AddForm.department;
	var count =0;
	for (i=0; i<departmentDropDown.length;i++)
	{
		if(departmentDropDown[i].selected)
			count++;
	}
	if(count==0){
		alert("Please Select a Department");
		return false;
	}
	var productDropDown = document.AddForm.product;
	count =0;
	for (i=0; i<productDropDown.length;i++)
	{
		if(productDropDown[i].selected && i>0)
			count++;
	}
	if(count==0){
		alert("Please Select a Product");
		return false;
	}
	var categoryDropDown = document.AddForm.category;
	count =0;
	for (i=0; i<categoryDropDown.length;i++)
	{
		if(categoryDropDown[i].selected)
			count++;
	}
	if(count==0){
		alert("Please Select a Category");
		return false;
	}
	brandDropDown = document.AddForm.brand;
	count =0;
	for (i=0; i<brandDropDown.length;i++)
	{
		if(brandDropDown[i].selected)
			count++;
	}
	if(count==0){
		alert("Please Select a Brand");
		return false;
	}
	return confirm("Are you Sure?");
}